www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\zhanghu_modi.asp
<!-- #include file="conn.asp" --> <% '**************************************************** 'Code for EptimeFFMS 'Vision : v4.0 '**************************************************** %> <html> <head> <title><%=sitename%>-修改帐号</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="images/admin.css" rel="stylesheet" type="text/css"> <style> body { background-color:#FFFFFF; } </style> </HEAD> <BODY> <%if request("hid1")="" then%> <script language="javascript"> function check() { if (document.form1.name.value=="") { alert("有*号的必须填写!"); return false; } } </script> <% sql="select * from Eptime_zhanghu where id="&request("id") set rs=conn.execute(sql) %> <form name="form1"> <table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED"> <tr> <td><img src="images/r_1.gif" alt="" /></td> <td width="100%" background="images/r_0.gif"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> 修改帐号(带*号的为必填项)</td> <td align="right"> </td> </tr> </table> </td> <td><img src="images/r_2.gif" alt="" /></td> </tr> <tr> <td></td> <td> <table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1"> <tr> <td width="25%" height="30" align="right">帐号类型:</td> <td width="75%" class="category"> <select name="type"> <option value="0" <%if rs("type")=0 then%> selected="selected"<%end if%>>固定资产账户</option> <option value="1" <%if rs("type")=1 then%> selected="selected"<%end if%>>现金账户</option> <option value="2" <%if rs("type")=2 then%> selected="selected"<%end if%>>储蓄账户</option> <option value="3" <%if rs("type")=3 then%> selected="selected"<%end if%>>信用卡账户</option> <option value="4" <%if rs("type")=4 then%> selected="selected"<%end if%>>借贷账户</option> <option value="5" <%if rs("type")=5 then%> selected="selected"<%end if%>>投资账户</option> <option value="6" <%if rs("type")=6 then%> selected="selected"<%end if%>>其他账户</option> </select> </td> </tr> <tr> <td height="30" align="right">帐号名称:</td> <td class="category"> <input type="text" name="name" style="width:300px" value="<%=rs("name")%>"> <font color="#ff0000">*</font></td> </tr> <tr> <td height="30" align="right">当前余额:</td> <td class="category"> <input type="text" name="amount" style="width:100px" value="<%=rs("amount")%>"> <font color="#ff0000">*</font>(正或者负的小数) </td> </tr> <tr> <td height="30" align="right">说 明:</td> <td class="category"> <input type="text" name="beizhu" style="width:300px" value="<%=rs("beizhu")%>"> </td> </tr> <tr> <td height="30"> </td> <td class="category"> <input name="submit" type="submit" onClick="return check()" value=" 确 认 " class="button"> <input type="hidden" name="hid1" value="ok"> <input type="hidden" name="id" value="<%=request("id")%>"> <input name="reset" type="reset" value=" 重新填写 " class="button"> <input type="button" value=" 放弃修改返回 " onClick="window.history.go(-1)" class="button"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td><img src="images/r_4.gif" alt="" /></td> <td></td> <td><img src="images/r_3.gif" alt="" /></td> </tr> </table> </form> <% else nowtype=request("type") nowname=request("name") nowamount=request("amount") nowbeizhu=request("beizhu") sql="select * from Eptime_zhanghu where name='"&nowname&"' and id<>"&request("id") set rs=conn.execute(sql) if rs.eof=false then %> <script language="javascript"> alert("您输入的帐户名称已经存在!") window.history.go(-1) </script> <% response.end end if sql="update Eptime_zhanghu set name='"&nowname&"',type="&nowtype&",amount="&nowamount&",beizhu='"&nowbeizhu&"' where id="&request("id") conn.execute(sql) %> <script language="javascript"> alert("帐号修改成功!") window.location.href="zhanghu.asp" </script> <% end if %> </body> </html>